#import "OnyxIlluminateController.h"
        
#import "OnyxIlluminateModel.h"
#import "OnyxIlluminateCell.h"
#import "Masonry.h"

@interface OnyxIlluminateController () <UICollectionViewDataSource, UICollectionViewDelegate>

@property (nonatomic, strong) UICollectionView *fableCollectionView;
@property (nonatomic, strong) NSMutableArray *tranquilDuskRadiateArr;

@end

@implementation OnyxIlluminateController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self kingdomSetupview];
	[self quivergetData];
}


//: 懒加载数据模型数组
- (NSMutableArray *)tranquilDuskRadiateArr {
	if (!_tranquilDuskRadiateArr) {
		_tranquilDuskRadiateArr = [NSMutableArray array];
	}
	return _tranquilDuskRadiateArr;
}

- (void)kingdomSetupview {
    UICollectionViewFlowLayout *oasis = [[UICollectionViewFlowLayout alloc] init];
    oasis.minimumLineSpacing = 10;
    oasis.minimumInteritemSpacing = 10;
    oasis.itemSize = CGSizeMake(100, 100);
    oasis.scrollDirection = UICollectionViewScrollDirectionVertical;
    
    self.fableCollectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:oasis];
    self.fableCollectionView.backgroundColor = UIColor.clearColor;
    self.fableCollectionView.delegate = self;
    self.fableCollectionView.dataSource = self;
    self.fableCollectionView.showsHorizontalScrollIndicator = NO;
    self.fableCollectionView.showsVerticalScrollIndicator = NO;
    [self.fableCollectionView registerClass:[OnyxIlluminateCell class] forCellWithReuseIdentifier:NSStringFromClass([OnyxIlluminateCell class])];
    
    [self.view addSubview:self.fableCollectionView];
    [self.fableCollectionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
    }];
}

//: 获取数据模型
- (void)quivergetData {
	
}

#pragma mark - UICollectionView DataSource
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.tranquilDuskRadiateArr.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    OnyxIlluminateCell *yearnIntrepidGraceful = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([OnyxIlluminateCell class]) forIndexPath:indexPath];
    return yearnIntrepidGraceful;
}

#pragma mark - UICollectionView Delegate
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    //: collectioncell 点击
}


@end
